﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'ReporteProveedores')
	BEGIN
		DROP  Procedure  ReporteProveedores
	END

GO

CREATE Procedure ReporteProveedores

	(
		@proveedor nvarchar(50)
	)


AS
begin
SELECT
	[Proveedor].[IDProveedor] AS 'IDProveedor',
	[Proveedor].[Contacto] AS 'Contacto',
	[Proveedor].[Direccion] AS 'Direccion',
	[Proveedor].[Email] AS 'Email',
	[Proveedor].[RazonSocial] AS 'Razon Social',
	[Proveedor].[RUC] AS 'RUC',
	[Proveedor].[Telefono] AS 'Telefono'
FROM [dbo].[Proveedor] [proveedor]

where [Proveedor].[RazonSocial] like @proveedor+'%'
end


GO


GRANT EXEC ON ReporteProveedores TO PUBLIC

GO


